package com.ptu.spzx.feign.userInfo;

import com.github.pagehelper.PageInfo;
import com.ptu.spzx.model.entity.system.SysDept;
import com.ptu.spzx.model.entity.system.SysUser;
import com.ptu.spzx.model.entity.user.UserInfo;
import com.ptu.spzx.model.vo.common.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "service-manager")
public interface ManagerFeignClient {
    @GetMapping("/ac/system/sysDept/findDeptAll")
    public List<SysDept> findDeptAll();

    @GetMapping("/ac/system/sysUser/setClassId/{stuIds}")
    public Result setClassId(@PathVariable("stuIds") List<String> stuIds, @RequestParam(value = "className") String className);

    @GetMapping("/ac/system/sysUser/getStu/{stuId}")
    public SysUser getStu(@PathVariable("stuId") String stuId);

    @GetMapping("/ac/system/sysUser/getStuList")
    public List<SysUser> getStuList(@RequestParam("className") String className);

    @GetMapping("/ac/system/sysUser/getStuListByClass")
    public List<String> getStuListByClass(@RequestParam("className") String className);

    @GetMapping("/ac/system/sysUser/setClassNull")
    public Result setClassNull(@RequestParam("className") String className);

    @GetMapping("/ac/system/sysUser/addCourseUser")
    public Result addCourseUser(@RequestParam(value = "teachIds") List<Long> teachIds,@RequestParam Long courseId);

        @GetMapping("/ac/system/sysUser/getStuListByClassName/{pageNum}/{pageSize}")
    public PageInfo<SysUser> getStuListByClassName(@RequestParam("classNames") List<String> classNames
                                                    , @PathVariable("pageNum") Integer pageNum,
                                                   @PathVariable("pageSize")Integer pageSize);

    @GetMapping("/ac/system/sysUser/deleteCourseUser")
    public Result deleteCourseUser(@RequestParam Long curseId);

    @GetMapping("/ac/system/sysUser/selectCourseIdByteachId")
    public List<Long> selectCourseIdByteachId(@RequestParam Long teachId);

    @GetMapping("/ac/system/sysUser/selectTeacherIdByCourseId")
    public List<Long> selectTeacherIdByCourseId(@RequestParam Long courseId);

    @GetMapping("/ac/system/sysUser/getStuListByStuIds")
    public List<SysUser> getStuListByAllStuId(@RequestParam("stuIds") List<String> stuIds);

    @GetMapping("/ac/system/sysUser/getStuInfo")
    public SysUser getStuInfo(@RequestParam("userName") String userName);

    @GetMapping("/ac/system/sysDept/findDeptFeign")
    public SysDept findDeptFeign(@RequestParam Long id);

    @GetMapping("/ac/system/sysDept/findByPage/{pageNum}/{pageSize}")
    public PageInfo<SysDept>  findByPage(@PathVariable("pageNum") Integer pageNum,
                                         @PathVariable("pageSize") Integer pageSize,
                                         @RequestParam (value = "keyWord",required = false) String keyWord,
                                         @RequestParam (value = "classIds",required = false) List<Long> classIds );
}
